CREATE SEQUENCE "SEQ_VKS_AUTHORIZATION" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 21 CACHE 20 NOORDER NOCYCLE ;

CREATE TABLE "VKS_AUTHORIZATION"
  (
    "AUTHORIZATION_ID" NUMBER NOT NULL ENABLE,
    "USER_LOGIN"       VARCHAR2(25 BYTE) NOT NULL ENABLE,
    "USER_PASSWORD"    VARCHAR2(25 BYTE) NOT NULL ENABLE,
    "USER_ROLE"        VARCHAR2(25 BYTE) NOT NULL ENABLE,
    CONSTRAINT "VKS_AUTHORIZATION_PK" PRIMARY KEY ("USER_LOGIN") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT) TABLESPACE "USERS" ENABLE
  )
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING STORAGE
  (
    INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT
  )
  TABLESPACE "USERS" ;
CREATE OR REPLACE TRIGGER "VKS_AUTHORIZATION_PK_TRIGGER" BEFORE
  INSERT ON "VKS_AUTHORIZATION" FOR EACH ROW BEGIN
  SELECT SEQ_VKS_AUTHORIZATION.NEXTVAL INTO :NEW.AUTHORIZATION_ID FROM DUAL;
END;
/
ALTER TRIGGER "VKS_AUTHORIZATION_PK_TRIGGER" ENABLE;

CREATE SEQUENCE "SEQ_VKS_SERVER_LOG" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 301 CACHE 20 NOORDER NOCYCLE ;

CREATE TABLE "VKS_SERVER_LOG"
  (
    "LOG_ID"      NUMBER NOT NULL ENABLE,
    "SERVER_NAME" VARCHAR2(20 BYTE),
    "MESSAGE"     VARCHAR2(500 BYTE),
    "TIME" TIMESTAMP (6) DEFAULT SYSTIMESTAMP NOT NULL ENABLE,
    "CLIENT" VARCHAR2(150 BYTE),
    "PORT"   NUMBER,
    CONSTRAINT "VKS_SERVER_LOG_PK" PRIMARY KEY ("LOG_ID") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT) TABLESPACE "USERS" ENABLE
  )
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING STORAGE
  (
    INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT
  )
  TABLESPACE "USERS" ;
CREATE OR REPLACE TRIGGER "VKS_SERVER_LOG_PK_TRIGGER" BEFORE
  INSERT ON "VKS_SERVER_LOG" FOR EACH ROW BEGIN
  SELECT SEQ_VKS_SERVER_LOG.NEXTVAL INTO :NEW.LOG_ID FROM DUAL;
END;
/
ALTER TRIGGER "VKS_SERVER_LOG_PK_TRIGGER" ENABLE;

CREATE SEQUENCE "SEQ_VKS_FILE_TRANSFER_LOG" MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 41 CACHE 20 NOORDER NOCYCLE ;

CREATE TABLE "VKS_FILE_TRANSFER_LOG"
  (
    "LOG_ID"      NUMBER NOT NULL ENABLE,
    "SERVER_NAME" VARCHAR2(20 BYTE),
    "PORT"        NUMBER NOT NULL ENABLE,
    "FILE_NAME"   VARCHAR2(150 BYTE) NOT NULL ENABLE,
    "FILE_SIZE"   NUMBER NOT NULL ENABLE,
    "STATUS"      VARCHAR2(20 BYTE),
    "TIME" TIMESTAMP (6) DEFAULT SYSTIMESTAMP NOT NULL ENABLE,
    "TRANSFER_SPEED" VARCHAR2(20 BYTE),
    "CLIENT"         VARCHAR2(150 BYTE),
    CONSTRAINT "VKS_FILE_TRANSFER_LOG_PK" PRIMARY KEY ("LOG_ID") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT) TABLESPACE "USERS" ENABLE
  )
  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING STORAGE
  (
    INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT
  )
  TABLESPACE "USERS" ;
CREATE OR REPLACE TRIGGER "FILE_TRANSFER_PK_TRIGGER" BEFORE
  INSERT ON "VKS_FILE_TRANSFER_LOG" FOR EACH ROW BEGIN
  SELECT SEQ_VKS_FILE_TRANSFER_LOG.NEXTVAL INTO :NEW.LOG_ID FROM DUAL;
END;
/
ALTER TRIGGER "FILE_TRANSFER_PK_TRIGGER" ENABLE;